﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO.IsolatedStorage;

namespace PPFinance.Downloader
{
    public partial class Space : ChildWindow
    {
        public Space()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            using (IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication())
            {
                if (file.Quota < 100 * 1024 * 1024)
                {
                    file.IncreaseQuotaTo(100 * 1024 * 1024);
                }

            }
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            using (IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication())
            {
                if (file.Quota < 100 * 1024 * 1024)
                {
                    file.IncreaseQuotaTo(100 * 1024 * 1024);
                }

            }
            this.DialogResult = false;
        }
    }
}

